tests: asyncio: collect garbage in run_until_complete_nesting#144168
tests: asyncio: collect garbage in run_until_complete_nesting#144168benzea wants to merge 1 commit intopython:mainfrom
Conversation
The test checks that coro1 emits a runtime warning when it is garbage collected. cpython will do this collection immediately, but other implementations such as PyPy might not. Add the appropriate call to support.gc_collect() to ensure the warning is emitted while still in the with statement.
|
Most changes to Python require a NEWS entry. Add one using the blurb_it web app or the blurb command-line tool. If this change has little impact on Python users, wait for a maintainer to apply the |
|
Is the only place? I would appreciate an issue for this as well. |
It is the only place I noticed. But we only ran test_events.py against it for the pygobject GLibEventLoop integration tests. And even there we now switch to simply use the pypy sources instead, we pulled in the cpython version more by accident. That said, I do think it is technically a bug, and there might be more … maybe it would actually be effective to diff the pypy version and see what they changed. I suppose I can open a ticket and update the patch. I guess I'll wait a bit in case I find the motivation to check if more things need to be changed. |
|
Still, please open a ticket with the specific bug. If there is more to do we will update the ticket. But this is something that needs to be tracked, at least for posterity. |
The test checks that coro1 emits a runtime warning when it is garbage collected. cpython will do this collection immediately, but other implementations such as PyPy might not. Add the appropriate call to support.gc_collect() to ensure the warning is emitted while still in the with statement.